<!DOCTYPE html>
<!-- saved from url=(0048)http://marakana.com/forums/java/examples/47.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>
  JNI Example - Marakana</title>


<meta name="keywords" content="training, jni, example">
<link href="./JNI Example - Marakana_files/layout.css" rel="stylesheet" type="text/css">
<link href="./JNI Example - Marakana_files/common.css" rel="stylesheet" type="text/css">
<link href="./JNI Example - Marakana_files/style.css" rel="stylesheet" type="text/css">
<!--[if lte IE 6]>
  <link href="/css/ie6.css?v=1328512964000" rel="stylesheet" type="text/css" />
  <![endif]-->
<link href="./JNI Example - Marakana_files/all-v3.css" rel="stylesheet" type="text/css">
<link href="./JNI Example - Marakana_files/print-v2.css" rel="stylesheet" type="text/css" media="print">
<link rel="icon" href="http://marakana.com/static/skin/marakana/images/favicon.ico" type="image/x-icon">
  <link rel="shortcut icon" href="http://marakana.com/static/skin/marakana/images/favicon.ico" type="image/x-icon">
<script src="./JNI Example - Marakana_files/cb=gapi.loaded_0" async=""></script><script src="./JNI Example - Marakana_files/jsapi" type="text/javascript"></script>
<script src="./JNI Example - Marakana_files/prototype.js" type="text/javascript"></script>
<script src="./JNI Example - Marakana_files/scriptaculous.js" type="text/javascript"></script>
<script src="./JNI Example - Marakana_files/jquery.min.js" type="text/javascript"></script>
<script src="./JNI Example - Marakana_files/jquery-ui.min.js" type="text/javascript"></script>
<link href="./JNI Example - Marakana_files/jquery-ui.css" rel="stylesheet" type="text/css">

<script type="text/javascript">
jQuery.noConflict();
</script>
<script type="text/javascript" src="./JNI Example - Marakana_files/functions.js"></script>
<script type="text/javascript" src="./JNI Example - Marakana_files/getAppDefault.esi"></script><script type="text/javascript" src="./JNI Example - Marakana_files/checkOAuth.esi"></script><link rel="stylesheet" type="text/css" href="./JNI Example - Marakana_files/buttons.20a85a6a67053717023e8d12a9dba430.css"><script type="text/javascript" src="./JNI Example - Marakana_files/plusone.js" gapi_processed="true"></script><script type="text/javascript" src="./JNI Example - Marakana_files/getCount2.php"></script><script type="text/javascript" src="./JNI Example - Marakana_files/getAppDefault(1).esi"></script></head>
  <body id="forums-page47" class="forums-page" itemscope="itemscope" itemtype="http://schema.org/WebPage">
    <div id="header">
      <div class="page-part">
        <div class="content-part">
          <div id="top-bar">
            <div id="user-box">
  <a href="http://marakana.com/login.html">Login</a>
    <a href="http://marakana.com/user/registration.html">Create an Account</a>
  </div> <!-- #user-box -->
<div id="contactus-box">
  <a href="http://marakana.com/contact_us.html">Contact us</a>
  <em>1 (415) 647-7000</em>
  </div> <!-- #contactus-box -->
</div> <!-- #top-bar -->
          <div id="page-header">
            <div id="top-navigation">
    <ul>
      <li><a href="http://marakana.com/">Home</a></li>
      <li><a href="http://marakana.com/training/schedule.html">Training</a></li>
      <li><a href="http://marakana.com/s/" class="selected">Resources</a></li>
      <li><a href="http://marakana.com/about/index.html">About Us</a></li>
      </ul>
  </div> <!-- #top-navigation -->
<br class="clear">
<div id="sub-navigation">
    <ul>
      <li>
          <a href="http://marakana.com/s">Stream</a>
        </li>
      <li>
          <a href="http://marakana.com/forums/" class="selected">Forums</a>
        </li>
      <li>
          <a href="http://marakana.com/techtv/about.html">TechTV</a>
        </li>
      <li>
          <a href="http://marakana.com/bookshelf.html">Bookshelf</a>
        </li>
      </ul>
  </div> <!-- #sub-navigation -->
</div> <!-- #page-header -->
        </div> <!-- content-part -->
        <div class="side-part">
          <div id="side-top">
            </div> <!-- #side-top -->
          <div id="side-header">
            <a href="http://marakana.com/">
    <img id="company-logo" src="./JNI Example - Marakana_files/logo-marakana-orange-white-200x50.png" alt="Logo">
  </a>
</div> <!-- #side-header -->
        </div> <!-- side-part -->
      </div> <!-- page-part -->
    </div> <!-- #header -->
    <div id="main">
      <div id="main-outer" class="page-part">
        <div id="main-content" class="content-part">
          <div id="content">
            <h1 itemprop="name">JNI Example</h1>
            <div id="breadcrums">
  <a href="http://marakana.com/s/" class="selected">Resources</a>
          »
        <a href="http://marakana.com/forums/" class="selected">Forums</a>
   »

   <a href="http://marakana.com/forums/java/examples/">
    Java - Examples</a>
  &gt;
  JNI Example</div>
<div class="forumPost" id="p84">
    <div class="postHeader">
      <div class="time">
        November 25, 2009 10:13:56 AM PST
        (3 years ago).
          <span class="numberOfViews">Seen 5,086 times.</span>
          <span class="numberOfReplies">No replies.</span>
          <div class="blurb">
<script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="./JNI Example - Marakana_files/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'7d0856ac-d0ba-4f42-a53b-10da969828e1'});</script>

<div style="padding-top:7px;">
<span class="st_plusone_hcount" displaytext="+1" st_processed="yes"><div style="display:inline-block;overflow:hidden;line-height:0px;position:relative;vertical-align:middle;bottom:0px;width:75px; height:21px;">&nbsp;<div id="___plusone_0" style="text-indent: 0px; margin: 0px; padding: 0px; background-color: transparent; border-style: none; float: none; line-height: normal; font-size: 1px; vertical-align: baseline; display: inline-block; width: 90px; height: 20px; background-position: initial initial; background-repeat: initial initial;"><iframe frameborder="0" hspace="0" marginheight="0" marginwidth="0" scrolling="no" style="position: static; top: 0px; width: 90px; margin: 0px; border-style: none; left: 0px; visibility: visible; height: 20px;" tabindex="0" vspace="0" width="100%" id="I0_1371526044982" name="I0_1371526044982" src="./JNI Example - Marakana_files/fastbutton.htm" allowtransparency="true" data-gapiattached="true" title="+1"></iframe></div></div></span><span class="st_twitter_hcount" displaytext="Tweet" st_processed="yes"><span style="text-decoration:none;color:#000000;display:inline-block;cursor:pointer;" class="stButton"><span><span class="stMainServices st-twitter-counter" style="background-image: url(http://w.sharethis.com/images/twitter_counter.png);">&nbsp;<img src="./JNI Example - Marakana_files/check-big.png" style="position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; max-width: 19px; max-height: 19px; display: none;"></span><span class="stArrow"><span class="stButton_gradient stHBubble" style="display: inline-block;"><span class="stBubble_hcount">2</span></span></span></span></span></span><span class="st_facebook_hcount" displaytext="Share" st_processed="yes"><span style="text-decoration:none;color:#000000;display:inline-block;cursor:pointer;" class="stButton"><span><span class="stMainServices st-facebook-counter" style="background-image: url(http://w.sharethis.com/images/facebook_counter.png);">&nbsp;<img src="./JNI Example - Marakana_files/check-big.png" style="position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; max-width: 19px; max-height: 19px; display: none;"></span><span class="stArrow"><span class="stButton_gradient stHBubble" style="display: inline-block;"><span class="stBubble_hcount">1</span></span></span></span></span></span><span class="st_reddit_hcount" displaytext="Reddit" st_processed="yes"><span style="text-decoration:none;color:#000000;display:inline-block;cursor:pointer;" class="stButton"><span><span class="stButton_gradient"><span class="chicklets reddit">Reddit</span><img src="./JNI Example - Marakana_files/check-big.png" style="position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; max-width: 19px; max-height: 19px; display: none;"></span><span class="stArrow"><span class="stButton_gradient stHBubble" style="display: inline-block;"><span class="stBubble_hcount">1</span></span></span></span></span></span><span class="st_sharethis_hcount" displaytext="ShareThis" st_processed="yes"><span style="text-decoration:none;color:#000000;display:inline-block;cursor:pointer;" class="stButton"><span><span class="stMainServices st-sharethis-counter" style="background-image: url(http://w.sharethis.com/images/sharethis_counter.png);">&nbsp;<img src="./JNI Example - Marakana_files/check-big.png" style="position: absolute; top: -7px; right: -7px; width: 19px; height: 19px; max-width: 19px; max-height: 19px; display: none;"></span><span class="stArrow"><span class="stButton_gradient stHBubble" style="display: inline-block;"><span class="stBubble_hcount">1525</span></span></span></span></span></span>

</div></div> <!-- blurb -->
</div>
      <div class="actions">
        
        [<a href="http://marakana.com/forums/post_reply.html?topic=47#reply">Reply</a>]
        [<a href="http://marakana.com/forums/java/examples/47.html#p84">Permalink</a>]
      </div>
    </div>
    <div class="author">
      <div class="personal">
        <img class="user_pic" src="./JNI Example - Marakana_files/2ac8c4a74496ee2ae0c2ebad14465524.jpg" alt="Photo">
        Marko Gargenta<div class="title">@MarkoGargenta</div>
        <div class="organization_name">Marakana, Inc.</div>
      </div>
      <div class="extra">
        Member since Jan 19, 2007<br>
        Location: San Francisco<br>
        Forum Posts: 228<br>
        </div>
    </div>
    <div class="message">
      JNI is an interface that allows Java to interact with code written in another language. Motivation for JNI is code reusability and performance. WIth JNI, you can reuse existing/legacy code with Java (mostly C/C++). In terms of performance,  native code used to be up to 20 times faster than Java, when running in interpreted mode. Modern JIT compilers (HotSpot) make this a moot point.<br><br>JNI can also be used to invoke Java code from within natively-written applications - such as those written in C/C++.<br>In fact, the <code class="inline">java</code> command-line utility is an example of one such application, that launches Java code in a Java Virtual Machine.
<br><br><strong>JNI Components</strong><br><br><code class="inline">javah</code> is a JDK tool that builds C-style header files from a given Java class that includes native methods. It adapts Java method signatures to native function prototypes<br><br><code class="inline">jni.h</code> is a C/C++ header file included with the JDK that maps Java types to their native counterparts. <code class="inline">javah</code> automatically includes this file in the application header files.<br><br>JNI data type mapping in variables<br><br><div class="code">
		    <span>Code:</span><br>
		    <pre style="height:expression(this.scrollHeight &gt; 350 ? &#39;350px&#39; : &#39;auto&#39;);"><br>boolean	jboolean <br>byte	jbyte <br>char	jchar <br>double	jdouble <br>float	jfloat <br>int	jint <br>long	jlong <br>short	jshort <br>void	void<br></pre>
		  </div><br><br><strong>JNI Development - Java Part</strong><br><br>1. Create a Java class with native method(s):<br><code class="inline">public native void sayHi(String who, int times);</code><br><br>2. Load the library which implements the method:<br><code class="inline">System.loadLibrary("HelloImpl");</code><br><br>3. Invoke the native method from Java<br><br>For example, our Java code could look like this:<br><div class="code">
		    <span>Code:</span><br>
		    <pre style="height:expression(this.scrollHeight &gt; 350 ? &#39;350px&#39; : &#39;auto&#39;);"><br>public class Hello { <br>  public <strong>native</strong> void sayHi(String who, int times);<br>    static { <strong>System.loadLibrary("HelloImpl");</strong> }<br>    public static void main (String[] args) { <br>      Hello hello = new Hello(); <br>      hello.<strong>sayHi</strong>(args[0], Integer.parseInt(args[1]));<br>    }<br>}<br></pre>
		  </div><br><br>The method <code class="inline">sayHi</code> will be implemented in C/C++ in separate file(s), which will be compiled into a library. The library filename will be called <code class="inline">libHelloImpl.so</code> (on Unix) or <code class="inline">HelloImpl.dll</code> (on Windows), but when loaded in Java, the library has to be loaded as <code class="inline">HelloImpl</code>.<br><br><br><strong>JNI Development - C Part</strong><br><br>1. We use the JDK <code class="inline">javah</code> utility to generate the header file <code class="inline">Hello.h</code> with a function prototype for <code class="inline">sayHi</code> method:<br><div class="code">
		    <span>Code:</span><br>
		    <pre style="height:expression(this.scrollHeight &gt; 350 ? &#39;350px&#39; : &#39;auto&#39;);"><br>javac Hello.java <br>javah -jni Hello<br></pre>
		  </div><br><br>2. We then create <code class="inline">Hello.c</code> to implement the <code class="inline">sayHi</code> function.<br><br>The file <code class="inline">Hello.h</code> looks like:<br><div class="code">
		    <span>Code:</span><br>
		    <pre style="height:expression(this.scrollHeight &gt; 350 ? &#39;350px&#39; : &#39;auto&#39;);"><br>... <br>#include &lt;jni.h&gt;<br>... <br>JNIEXPORT void JNICALL Java_Hello_sayHi (JNIEnv *, jobject, jstring, jint);<br>...<br></pre>
		  </div><br><br>The file <code class="inline">Hello.c</code> looks like:<br><div class="code">
		    <span>Code:</span><br>
		    <pre style="height:expression(this.scrollHeight &gt; 350 ? &#39;350px&#39; : &#39;auto&#39;);"><br>#include &lt;stdio.h&gt; <br>#include "Hello.h"	// generated by javah<br><br>JNIEXPORT void JNICALL Java_Hello_sayHi <br>(JNIEnv *env, jobject obj, jstring who, jint times) { <br>	jint i; <br>	jboolean iscopy; <br>	const char *name; <br>	name = (*env)-&gt;GetStringUTFChars(env, who, &amp;iscopy); <br>	for (i = 0; i &lt; times; i++) {<br>		printf("Hello %s\n", name);<br>	}<br>}<br></pre>
		  </div><br><br><strong>Compiling</strong><br><br>We are now ready to compile our program and run it.  The compilation is system-dependent. This will create <code class="inline">libHelloImpl.so</code> or <code class="inline">HelloImpl.dll</code> (depending on the O/S). Set <code class="inline">LD_LIBRARY_PATH</code> to point to the directory where the compiled library is stored. Run your Java application.<br><br>For example, to compile Hello.c on Linux do:<br><div class="code">
		    <span>Code:</span><br>
		    <pre style="height:expression(this.scrollHeight &gt; 350 ? &#39;350px&#39; : &#39;auto&#39;);"><br>gcc -o libHelloImpl.so -lc -shared \ <br>  -I/usr/local/jdk1.6.0_03/include \ <br>  -I/usr/local/jdk1.6.0_03/include/linux Hello.c<br></pre>
		  </div><br><br>Then set the <code class="inline">LD_LIBRARY_PATH</code> to the current working directory: <code class="inline">export LD_LIBRARY_PATH=.</code><br><br>Finally, run your application:<br><div class="code">
		    <span>Code:</span><br>
		    <pre style="height:expression(this.scrollHeight &gt; 350 ? &#39;350px&#39; : &#39;auto&#39;);"><br>java Hello Student 5 <br>Hello Student <br>Hello Student <br>Hello Student<br>Hello Student <br>Hello Student<br></pre>
		  </div><br><br>Common mistakes resulting in <code class="inline">java.lang.UnsatisfiedLinkError</code> usually come from incorrect naming of the shared library (O/S- dependent), the library not being in the search path, or wrong library being loaded by Java code.<br><br></div>
    <div class="history">
        Edited one time. Last edit by Marko Gargenta on Jun 14, 2010 at 10:41:38 PM (about 2 years ago).</div>
    </div>
<div class="noprint">
<div class="buttons">
      <a href="http://marakana.com/forums/post_reply.html?topic=47#reply"><button onclick="document.location.href=&#39;/forums/post_reply.html?topic=47#reply&#39;;" type="button" class="call-large">Post Reply</button></a>
</div>
  </div></div> <!-- #content -->
        </div> <!-- #main-content -->
        <div id="main-side" class="side-part">
          <form action="http://marakana.com/site_search.html" method="get">
  <div id="search-box">
    <input type="text" class="search-field-initial" id="search-field" name="q">
    <input type="hidden" name="s" value="0">
    <input type="image" id="search-button" src="./JNI Example - Marakana_files/search-box-button-placeholder.png" name="search" alt="Search">
  </div>
</form><div class="blurb related-info-box blurb-box">
<p><a href="http://www.twitter.com/marakana" target="_blank"><img src="./JNI Example - Marakana_files/follow.png"><br>to hear about new tech videos/tutorials/posts.</a></p>


  <!-- Category Logo -->
      <div class="related-info-box">
        <p>
          <a href="http://marakana.com/training/java/">
            <img src="./JNI Example - Marakana_files/logo-java.png" alt="Java" class="forumLogo">
          </a>
        </p>
      </div>

<div class="blurb">
<!-- Upcoming Classes -->
  <div class="related-info-box"> <!-- start of upcoming schedule -->
    <h2 id="upcomingEventsHeader">
      <span>Upcoming Java classes</span>
    </h2>
<div class="blurb">
    <div class="content-section">
                <div class="course-event-photo-box contact-photo-content-logo-box">
            <img class="contact-photo" src="./JNI Example - Marakana_files/bf387d6d49ed18eddc1553ccaa37f38f.jpg" alt="Neven Cvetkovic">
            <img src="./JNI Example - Marakana_files/logo-java.png" class="content-logo">
        </div>
            <a class="important" href="http://marakana.com/training/java/javaee_bootcamp.html">JavaEE Bootcamp</a>
            with <a href="http://marakana.com/expert/neven_cvetkovic,5534.html">Neven Cvetkovic</a>
            on
            Jul 22
            <span class="fade">(5 days)</span>
              in San Francisco
  	  <br><br>
        <div class="course-event-photo-box contact-photo-content-logo-box">
            <img class="contact-photo" src="./JNI Example - Marakana_files/8e0a7b9caa864548ffb61d433275a31e.jpg" alt="Rakesh Wagh">
            <img src="./JNI Example - Marakana_files/logo-java.png" class="content-logo">
        </div>
            <a class="important" href="http://marakana.com/training/java/google_web_toolkit.html">GWT for Enterprise Developers</a>
            with <a href="http://marakana.com/expert/rakesh_wagh,20560.html">Rakesh Wagh</a>
            on
            Jul 22
            <span class="fade">(4 days)</span>
              in San Francisco
  	  <br><br>
        <div class="course-event-photo-box contact-photo-content-logo-box">
            <img src="./JNI Example - Marakana_files/logo-java.png" class="content-logo">
        </div>
            <a class="important" href="http://marakana.com/training/java/groovy_and_grails.html">Groovy and Grails</a>
            
            on
            Jul 29
            <span class="fade">(5 days)</span>
              in San Francisco
  	  <br><br>
        <div class="course-event-photo-box contact-photo-content-logo-box">
            <img class="contact-photo" src="./JNI Example - Marakana_files/70e132054ab3d04644c5fb7445e66818.jpg" alt="Gordon Force">
            <img src="./JNI Example - Marakana_files/logo-java.png" class="content-logo">
        </div>
            <a class="important" href="http://marakana.com/training/java/java_bootcamp.html">Java™ Bootcamp</a>
            with <a href="http://marakana.com/expert/gordon_force,12075.html">Gordon Force</a>
            on
            Aug 5
            <span class="fade">(5 days)</span>
              in San Francisco
  	  <br><br>
        <div class="course-event-photo-box contact-photo-content-logo-box">
            <img class="contact-photo" src="./JNI Example - Marakana_files/70e132054ab3d04644c5fb7445e66818.jpg" alt="Gordon Force">
            <img src="./JNI Example - Marakana_files/logo-java.png" class="content-logo">
        </div>
            <a class="important" href="http://marakana.com/training/java/restful_java.html">RESTful Java™</a>
            with <a href="http://marakana.com/expert/gordon_force,12075.html">Gordon Force</a>
            on
            Aug 12
            <span class="fade">(3 days)</span>
              in San Francisco
  	  <br><br>
        <div class="course-event-photo-box contact-photo-content-logo-box">
            <img class="contact-photo" src="./JNI Example - Marakana_files/70e132054ab3d04644c5fb7445e66818.jpg" alt="Gordon Force">
            <img src="./JNI Example - Marakana_files/logo-java.png" class="content-logo">
        </div>
            <a class="important" href="http://marakana.com/training/java/spring_and_hibernate_bootcamp.html">Spring and Hibernate Bootcamp</a>
            with <a href="http://marakana.com/expert/gordon_force,12075.html">Gordon Force</a>
            on
            Aug 26
            <span class="fade">(5 days)</span>
              in San Francisco
  	  <br><br>
        <div class="course-event-photo-box contact-photo-content-logo-box">
            <img src="./JNI Example - Marakana_files/logo-java.png" class="content-logo">
        </div>
            <a class="important" href="http://marakana.com/training/java/groovy_and_grails.html">Groovy and Grails</a>
            
            on
            Oct 7
            <span class="fade">(5 days)</span>
              in San Francisco
  	  <br><br>
    </div></div> <!-- blurb -->
    <br>
    <p>
      <a class="important" href="http://marakana.com/training/java/schedule.html">See Complete Schedule</a>
    </p>
  </div> <!-- end of upcoming schedule -->
</div> <!-- blurb -->
<div class="blurb">
<div class="related-info-box">
<h2>Marakana Tutorials</h2>

<img class="course-icon" src="./JNI Example - Marakana_files/logo-python.png" alt="Python logo">
<div style="margin-left:35px;">
  <a class="important" href="http://marakana.com/bookshelf/python_fundamentals_tutorial/index.html">Python Tutorial</a>
</div>
<br class="clear">

<img class="course-icon" src="./JNI Example - Marakana_files/logo-jquery.png" alt="jQuery logo">
<div style="margin-left:35px;">
  <a class="important" href="http://marakana.com/bookshelf/jquery_tutorial/index.html">jQuery Tutorial</a>
</div>
<br class="clear">

<img class="course-icon" src="./JNI Example - Marakana_files/logo-html5.png" alt="HTML5 logo">
<div style="margin-left:35px;">
  <a class="important" href="http://marakana.com/bookshelf/html5_tutorial/index.html">HTML5 Tutorial</a>
</div>
<br class="clear">

<img class="course-icon" src="./JNI Example - Marakana_files/logo-java.png" alt="Java logo">
<div style="margin-left:35px;">
  <a class="important" href="http://marakana.com/bookshelf/java_fundamentals_tutorial/index.html">Java Tutorial</a>
</div>
<br class="clear">

<img class="course-icon" src="./JNI Example - Marakana_files/logo-jboss.png" alt="JBoss logo">
<div style="margin-left:35px;">
  <a class="important" href="http://marakana.com/bookshelf/jboss_admin_tutorial/index.html">JBoss Admin Tutorial</a>
</div>
<br class="clear">

<img class="course-icon" src="./JNI Example - Marakana_files/logo-selenium.png" alt="Selenium logo">
<div style="margin-left:35px;">
  <a class="important" href="http://marakana.com/bookshelf/selenium_tutorial/index.html">Selenium Tutorial</a>
</div>
<br class="clear">

</div></div> <!-- blurb -->
<div class="blurb">
<p>All content in <a href="http://marakana.com/forums/blog/">TechTalk</a> and <a href="http://marakana.com/techtv/">TechTV</a> is licensed under <a href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative Commons License</a> <small>(non-commercial)</small>. <br><strong>Please Share!</strong><br>
<img src="./JNI Example - Marakana_files/cc-license-88x31.png" alt="Creative Commons License">
</p>
</div> <!-- blurb -->
</div> <!-- blurb -->
</div> <!-- #main-side -->
        <div id="main-outer-footer"></div>
      </div> <!-- #main-outer -->
      <div id="main-footer"></div>
    </div> <!-- #main -->
    <div id="footer">
      <div class="page-part">
        <div id="footer-content" class="content-part">
          <div id="footer-blurb">
  <div class="blurb">
<div style="float: left; width: 33%">
<ul>
  <li><a href="http://marakana.com/">Home</a></li>
  <li><a href="http://marakana.com/training/schedule.html">Schedule</a></li>
  <li><a href="http://marakana.com/training/courses.html">Courses</a></li>
</ul>
</div>
<div style="float: left; width: 33%">
<ul>
  <li><a href="http://marakana.com/s/">Stream</a></li>
  <li><a href="http://marakana.com/techtv/index.html">TechTV</a></li>
  <li><a href="http://marakana.com/bookshelf.html">Bookshelf</a></li>
</ul>
</div>
<div style="float: left; width: 33%">
<ul>
  <li><a href="http://marakana.com/contact_us.html">Contact Us</a></li>
  <li><a href="http://marakana.com/forums/java/examples/47.html#" onclick="javascript:popUp(&#39;/legal/privacy_policy.html&#39;, 600, 600); return false;">Privacy Policy</a></li>
</ul>
</div>
<br class="clear">
<div>All trademarks belong to their respective owners.</div></div> <!-- blurb -->
</div> <!-- #footer-blurb -->

<div id="footer-company-info">
    <div id="company-name">Marakana</div>
    <div id="company-contact-info">
      <div id="company-address">
        301 Howard Street Suite 550<br>
        San Francisco, CA 94105<br>
      </div>
      <div id="company-phone">
        1 (415) 647-7000</div>
    </div>
  </div> <!-- #footer-company-info -->
<div id="footer-copyright">
    ©2012 Marakana Inc, purveyors of fine training since 2005.
    &nbsp;
    &nbsp;
    <small><a href="http://marakana.com/legal_site_info.html">Terms of Use</a></small>
  </div>
</div> <!-- content-part -->
        <div id="footer-side" class="side-part">
          <div id="footer-side-blurb">
  </div> <!-- #footer-side-blurb -->

</div> <!-- #footer-site-info -->
      </div> <!-- page-part -->
    </div> <!-- #footer -->
    <script type="text/javascript">
  imageButtonFix();
</script>

<!--[if lt IE 8]>
<script type="text/javascript">
  buttonFix();
</script>
<![endif]-->
<script type="text/javascript">
    var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
    document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  </script><script src="./JNI Example - Marakana_files/ga.js" type="text/javascript"></script>
  <script type="text/javascript">
    var pageTracker = _gat._getTracker("UA-95154-1");
    pageTracker._trackPageview();
  </script>


<iframe id="stSegmentFrame" name="stSegmentFrame" src="./JNI Example - Marakana_files/getSegment.htm" frameborder="0" scrolling="no" width="0px" height="0px" style="display:none;"></iframe><div id="stwrapper" class="stwrapper" style="visibility: hidden; top: -999px; left: -999px; width: 500px; z-index: 89999999;"><div class="stCloseNew2"></div><iframe allowtransparency="true" id="stLframe" class="stLframe" name="stLframe" frameborder="0" scrolling="no" width="500px" height="430px" src="./JNI Example - Marakana_files/index.5dd5fd0b155eaf5a57b6b6eacc740361.htm" style="top: 0px; left: 0px;"></iframe></div><div id="stOverlay" style="height: 100%; width: 100%; background-color: rgb(0, 0, 0); opacity: 0.6; position: fixed; display: none; left: 0px; top: 0px; z-index: 89999990;"></div></body></html>